package com.example.daojia.frametest.Common;

import io.reactivex.Observable;
import io.reactivex.android.schedulers.AndroidSchedulers;

/**
 * Created by zhangbin on 2018/7/27.
 */

public class rxjavaFunction {
    public Observable<Integer> getValue(int a) {
        for (int i = 0;i < 5;i++) {
            a += i;
        }

        return Observable.just(a)
                .subscribeOn(AndroidSchedulers.mainThread())
                .observeOn(AndroidSchedulers.mainThread());
    }
}
